Skip to content

feat(ledger): FormTxt templates for every document, 30 pixel lines that add up, and a key backup notice (0.13.9) - #13

Merged
nodemode-ai merged 19 commits into
mainfrom
feat/final-0.13.9
Nov 28, 2026
Merged

nodemode-ai merged 19 commits into
mainfrom
feat/final-0.13.9

Conversation

@nodemode-ai

Copy link
Copy Markdown
Contributor

feat(ledger): FormTxt templates for every document, 30 pixel lines that add up, and a key backup notice (0.13.9)

Summary

  • FormTxt templates ship for every kind the plain renderer draws: quote, order, invoice, purchase order, purchase invoice, goods receipt and statement, each in Letter and A4. formledger formtxt-template KIND [--a4] writes one and --all --out DIR writes all 14. The FormTxt page follows the plain page's size.
  • Document lines are 30 pixels tall. Cause of the 47: a second 16 pixel track was reserved under every line for its error text. The error is now a small tag on the line.
  • A document started from a template shows amounts and totals at once. Cause: totals only came back from the server after a save.
  • When the server made the key itself, the owner sees a notice with the key's path until they confirm a backup, and Setup shows the encryption facts. The key is never sent to the window.
  • The notice and the Encryption list are styled from a stylesheet. Cause of a fault seen in the compiled desktop app: they used inline style attributes, which the server's style-src 'self' policy blocks, so the notice did not show.
  • The goods receipt template was looked up under a name that did not match its documented environment value.

Commits

19 commits, oldest first, release commit last:

  • 6 feat (templates for every kind, key path and backup record, owner's session facts, notice and Setup facts, the confirmation route, the notice mounted)
  • 7 fix (grid totals, 30 pixel rows, notice position, goods receipt supplier, line removal, hint width, notice styles)
  • 5 docs (encryption, print, three log commits)
  • 1 chore (release)

Version

v0.13.9 (release commit is last). Bumped: internal/app/version.go, Makefile line 1, web/package.json, two fields in web/package-lock.json, src-tauri/tauri.conf.json, src-tauri/Cargo.toml, the formledger-desktop entry in src-tauri/Cargo.lock, the "Current build version" line in the four HASHOUT_LOG.md files, the README badge, and a new CHANGELOG.md section.

Checks

  • go build ./... passed at each of the 19 commits; go vet ./..., gofmt and npm run check in web/ passed at the head.
  • On the release build, in Chrome at CPU 4x with a slowed network: the exit run typed and posted a twenty-line invoice and opened the three reports with 0 layout shift on all 7 steps; a hard reload of a template-started document read 0 with every line at 30 pixels.
  • The desktop shell: cargo check and a debug cargo build on Linux finished with no errors and no warnings, the first compile of this shell. Run on a virtual display with the release server beside it: the window opened signed in, the server made formledger.key in the app data folder and reused it on a second start, the ledger file was not readable as a plain database, and the key backup notice and the Setup facts showed.
  • By the slices: all eight test documents drawn by FormTxt 0.38.0 from the shipped templates with no environment value set, a USD page at 612 by 792 points and a EUR invoice at 595 by 842; the notice confirmed and gone after a reload with 0 shift; dashboards with a JPY company read 638,000 JPY with an axis top of 317K; a template-started invoice posted with the totals the form showed.

Not run: FormCel's window reading the snapshot (the agent sent to do it was stopped before finishing). Posted documents through FormTxt (drafts were used). The purchase document form in a browser. The packaged app, and anything on macOS or Windows. Still above zero: opening Setup reads 0.00001 with input, and typing in a unit price after select-all read 0.00004 with input in one slice.

Merging

Merge with a merge commit so each commit and its signature stays. Do not squash.

…tter and a4

FormTxt now has a template for quotes, sales orders, purchase orders, purchase invoices and goods receipts beside the invoice and statement, and the lookup picks the Letter or A4 title by the same currency rule as the plain page. formtxt-template takes any kind, --a4, and --all --out DIR.
HomeStatus says whether the ledger is encrypted, where its key is and whether the owner confirmed a backup; ConfirmHomeBackup writes a marker beside a key the server made.
…rmation

The owner's /api/me now carries the key state (path only, never the key), and a new handler records that the made key was backed up.
The owner sees a fixed notice in the overlay root until they confirm the made key is backed up, and the Setup hub always lists encryption, key file and backup state.
The line grid now works out each line's amount, tax and the document totals itself, on every edit and when a template's lines are set, writing into the existing cells.
The reserved error band under each line is gone; a line error now shows as a small tag laid over the row's lower edge.
The notice now sits at the bottom end of the window, over the content, so it no longer covers the sidebar's account row.
The goods receipt template named the customer fields, so FormTxt left the supplier blank; it now merges supplier, supplierName and supplierRef.
Removing a line now moves the following lines' values up one row and drops the last row node, so no row changes position.
Says when the owner sees the backup notice, what the confirmation writes and where Setup lists the key state.
…ge size rule

PRINT.md lists each shipped template, the Letter and A4 titles chosen by currency, the --all command, and the 2026-11-27 run against FormTxt 0.38.0 with the page size of each print.
The log records why the A4 twin is made at write time and why the lookup never uses the other size.
Records the pre-write statement, the shift numbers and the JPY and USD dashboard readings.
POST /api/me/key-backed-up records that the owner backed up the key the server made.
The window mounts the notice that says the books are encrypted and where the key is.
The account hint beside a free line's description now holds a fixed box, so changing its text never moves it.
Why the error band went, how the grid totals lines and how removal keeps rows still.
…licy allows it

The notice and the Encryption list set their layout with inline style attributes, which the server's style-src 'self' policy blocks. Seen in the compiled desktop app: the notice did not show and the list was unstyled. The rules now live in styles/key-notice.css.
Every version site moves to 0.13.9 and the changelog gets its section.
@nodemode-ai
nodemode-ai requested a review from gbarnai as a code owner November 28, 2026 04:01
@nodemode-ai
nodemode-ai merged commit e0c4f73 into main Nov 28, 2026
2 checks passed
@nodemode-ai
nodemode-ai deleted the feat/final-0.13.9 branch December 1, 2026 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant